/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package games.freecell.core;

import commomgame.RulesOfMovement;
import commomgame.SubRegion;

/**
 *
 * @author ian
 */
public class RulesOfReserves extends RulesOfMovement {

    public boolean verifyMovement(int value, String nipe, SubRegion originRegion, SubRegion regionTarget) {

        if (this.isEmptyStack(regionTarget)) {
            return true;
        } else {
            if (this.isAlternatedColor(regionTarget, nipe)) {
                if (this.isDescendent(regionTarget, value)) {
                    return true;
                }
            } else {
                return false;
            }
        }
        return false;
    }
}
